package com.joy.common;

import java.util.HashMap;
import java.util.Map;

public enum UserType {
    ADMIN("3"),
    TEACHER("1"),
    STUDENT("2");

    public static Map<String,String> userTypeToDesMap;
    public static Map<String,String> userDesToTypeMap;
    static {
        userTypeToDesMap =new HashMap<>();
        userTypeToDesMap.put("3", "管理员");
        userTypeToDesMap.put("1", "教师");
        userTypeToDesMap.put("2", "学生");
        userDesToTypeMap = new HashMap<>();
        userDesToTypeMap.put("管理员", "3");
        userDesToTypeMap.put("教师", "1");
        userDesToTypeMap.put("学生", "2");
    }

    private String type;

    UserType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

}
